package com.hsteach.dao.mapper;


import com.hsteach.dao.domain.patrol.Behavior;
import com.hsteach.dao.domain.patrol.InspectionDetail;
import com.hsteach.web.controller.patrol.dto.InspectionDetailDTO;
import com.hsteach.web.controller.patrol.dto.InspectionExportDTO;
import com.hsteach.web.controller.patrol.dto.QueryInspectionDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 巡查 mapper
 */
public interface InspectionMapper {
    List<InspectionDetail> getRecordByUseCode(QueryInspectionDTO queryInspectionDTO);

    /**
     * 查询巡检列表
     *
     * @param queryInspectionDTO
     * @return
     */
    List<InspectionDetail> listInspection(QueryInspectionDTO queryInspectionDTO);

    /**
     * z增加巡查
     * @param inspectionDetail
     * @return
     */
    int add(InspectionDetail inspectionDetail);

    /**
     * 更新分类信息
     * @param behavior
     */
    void updateOrdinanceById(Behavior behavior);

    /**
     * 导出
     * @param inspectionExportDTO
     * @return
     */
    List<InspectionDetail> export(InspectionExportDTO inspectionExportDTO);

    /**
     * 导出2,不获取已撤销的
     * @param inspectionExportDTO
     * @return
     */
    List<InspectionDetail> exportScore(InspectionExportDTO inspectionExportDTO);

    int batchAddInspection(@Param("inspectionDetailDTOList") List<InspectionDetailDTO> inspectionDetailDTOList);

    /**
     * 通过细则Id查询
     * @param behaviorId
     * @return
     */
    List<InspectionDetail> queryInspectionByBehaviorId(int behaviorId);



    int update(InspectionDetail inspectionDetail);

    InspectionDetail getInspectionByClasses(@Param("grade") String grade,@Param("classes") String classes,@Param("orgCode") String orgCode);

    int deleteInspection(@Param("id") int id, @Param("operatorRecord") String operatorRecord);

}
